{% extends "base.html" %}
{% block title %}一键预约结果{% endblock %}
{% block head %}
    {{ super() }}
    <style>
        h3 {
            align-items: center;
            justify-content: center;
            padding: 15px;
        }

        img {
            margin-right: 5px;
        }

        .resResult {
            padding: 5px 0;
            margin: 5px 0;
            border-bottom: 1px solid #E6E6E6;
        }
    </style>
{% endblock %}
{% block body %}
    <div class="contianer info-page" style="display: flex;flex-direction: column;">
        <div class="weui-well text-center">
            <h3 class="weui-flex">
                预约成功<span class="text-green">{{ successList|length }}</span>，失败<span
                    class="text-red">{{ errorList|length }}</span>！
            </h3>
            <div style="padding: 10px;">预约成功请准时到医院后手机或自助机报到</div>
        </div>
        {% if successList %}
            <div class="weui-well">

                {% for exam in successList %}
                    <div class="font12">
                        <div class="weui-flex resResult">
                            <div class="weui-flex">
                                <img style="width: 1.6em;height: 1.6em;"
                                     src="/static/images/success.png">
                                <div>
                                    {% for ex in exam["ExamList"] %}
                                        <div>{{ ex["bodyPart_second"] }}</div>
                                    {% endfor %}
                                </div>
                            </div>
                            <div class="weui-flex__item" style="text-align: right">预约时间：<span
                                    class="text-red">{{ exam["ReservationDateTime"] }}</span></div>
                        </div>
                    </div>
                {% endfor %}
                {% for exam in errorList %}
                    <div class="font12">
                        <div class="weui-flex resResult">
                            <div class="weui-flex__item weui-flex">
                                <img style="width: 1.6em;height: 1.6em;"
                                     src="/static/images/fail.png">
                                <div>
                                    {% for ex in exam["ExamList"] %}
                                        <div>{{ ex["bodyPart_second"] }}</div>
                                    {% endfor %}
                                </div>
                            </div>
                            <div class="weui-flex__item" style="text-align: right">预约时间：<span
                                    class="text-red">{{ exam["ReservationDateTime"] }}</span></div>
                        </div>
                    </div>
                {% endfor %}
            </div>
        {% endif %}
    </div>
{% endblock %}
{% block script %}
    {{ super() }}
    <script type="text/javascript">
        $(function () {

        })
    </script>
{% endblock %}